const mongoose = require('mongoose')
const Schema = mongoose.Schema


const commentsSchema = new Schema({
    sort : String,
    createAt :{type:Date,default:Date.now()},
    content:String,
    userImg:String,
    userName:String,
    reply:Array,
    title:String
    //mongodb 创建索引这里有坑，创建了unique就删除不了，会一直报错，需要删掉数据库的那个集合
})
//发布模型
mongoose.model('usercomments',commentsSchema)